#include <bits/stdc++.h>
using namespace std;
#define int long long
const int mod = 998244853;
typedef long long LL;
const int N = 2e6 + 10;

void solve()
{  
    int n;
    cin >> n;
    string s;
    cin >> s;
    vector<int> arr;
    for(int i = 1; i <= n;i ++) 
    {
        int x;
        cin >> x;
        arr.push_back(x);
    }
    vector<int> crr = arr;
    sort(crr.begin(),crr.end());
    int flag = 0;
    int cnt = 0;
    for(int i = 0; i < crr.size(); i ++)
    {
        if(crr[i] != arr[i])
        {
            cnt ++;
            flag = 1;
        }
    }
    if(flag == 0 || n == 2)
    {
        cout << "Alice" << endl;
        return;
    }
    if(cnt == 2)
    {
        cout << s << endl;
        return;
    }
    if(n == 3 && cnt == 3)
    {
        if(s == "Bob"){
            cout << "Alice" << "\n";
            return;
        }
    }
    cout << "Bob" << endl;
    return;
}
signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t = 1;
    cin >> t;
    while(t--)
    {
        solve();
    }
}
/*

 */